FROM registry.cn-hangzhou.aliyuncs.com/cdw/openjdk-cn:8-alpine
MAINTAINER chendw <chendw@bsoft.com.cn>

ENV APP_NAME="@artifactId@"
ENV JAVA_OPTS="" \
  ACTIVE="k8s"

COPY ${APP_NAME}.jar /app.jar
RUN sh -c 'touch /app.jar'

ENTRYPOINT ["/sbin/tini", "--"]
CMD [ "sh", "-c", "java $JAVA_OPTS -XX:+UseContainerSupport -XX:MaxRAMPercentage=80.0 -Duser.timezone=Asia/ShangHai -Djava.security.egd=file:/dev/./urandom -jar -Dspring.profiles.active=$ACTIVE /app.jar" ]
